package com.panda.entity.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("文章详情")
public class ArticleVo {

    @ApiModelProperty("文章标题")
    @NotEmpty(message = "标题不能为空")
    @Length(min = 6, max = 50, message = "标题长度必须位于6到50之间")
    private String title;

    @ApiModelProperty("文章内容")
    @NotEmpty(message = "内容不能为空")
    private String content;
    @ApiModelProperty("文章分类id")
    @NotNull(message = "分类不能为空")
    private Long categoryId;
    @ApiModelProperty("文章首图")
    private String thumbnail;
    //原创或转载
    @ApiModelProperty("是否原创")
    @NotEmpty(message = "版权类型不能为空")
    private String copyright;
}
